<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
    namespace="$prjsn$.Entity" assembly="$prjsn$.Entity">

  <class name="CustomList" table="[CustomList]" lazy="true">

    <cache usage="read-write" region="VeryLongTerm" />
    <id name="ID" column="CustomListId">
      <generator class="native" />
    </id>

    <property not-null="true"  name="Code"         column="Code" length="50" />
    <property not-null="false" name="Description"  column="Description" length="2000" />

    <many-to-one name="Parent" class="CustomList"  column="IdParent" />
    <property not-null="false" name="ParentId"     column="IdParent" insert="false" update="false" />

    <many-to-one name="CustomListType" class="CustomListType"  column="CustomListTypeId"  fetch="join" />
    <property not-null="true"  name="CustomListTypeId" column="CustomListTypeId"  insert="false" update="false" />

    <property not-null="true"  name="IsVisible"    column="IsVisible" />
  </class>

</hibernate-mapping>